/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import java.util.List;
import org.hibernate.Session;
import pojo.ChiTietPhieuThu;
import util.NewHibernateUtil;

/**
 *
 * @author 0
 */
public class ChiTietPhieuThuDAO extends BaseDAO{
    public static List<ChiTietPhieuThu> LayDanhSachPhieuThuByPhieuThuID(Integer phieuThuID) throws Exception{
        Session session=NewHibernateUtil.getSessionFactory().openSession();
        List<ChiTietPhieuThu> chiTietPhieuThus=session.createQuery(String.format("from ChiTietPhieuThu ctpt where ctpt.phieuThu.id=%d",phieuThuID)).list();
        session.close();
        return chiTietPhieuThus;
    }
}
